export function getGameList(num: number, startIndex?: number) {
  const imgs = [
    "/images/home/games/1.png",
    "/images/home/games/2.png",
    "/images/home/games/3.png",
    "/images/home/games/4.gif",
    "/images/home/games/5.gif",
    "/images/home/games/6.png",
    "/images/home/games/7.png",
    "/images/home/games/8.png",
    "/images/home/games/9.png",
    "/images/home/games/10.png",
  ];
  let activeIndex = startIndex || -1;
  return new Array(num).fill({}).map((item, index) => {
    const id = Math.floor(Math.random() * 100000);
    activeIndex++;
    if (activeIndex >= 10) activeIndex = 0;
    return {
      id,
      img: imgs[activeIndex],
    };
  });
}
